import {ServerInfo} from "@/config/ServerInfoConfig.js";

export const postTableOption = {
    stripe: true, //条纹
    addBtn: false,
    viewBtn: true,
    searchIndex: 3,
    searchIcon: true,
    height: '68vh',
    selection: true, //多选
    reserveSelection: true, //翻页多选
    index: true, //加序号
    showSummary: true, //展开底部求和
    menuType: 'icon', // 操作栏改为图标展示
    loadingText: "数据加载中...",
    emptyText: '数据空空如也...',
    column: [
        {label: '主键', prop: 'id', hide: true},
        {label: '作者id', prop: 'authorId', hide: true},
        {label: '标题', prop: 'title',},
        {label: '描述', prop: 'desc',},
        {label: '文章内容', prop: 'content', hide: true},
        {label: '查看数', prop: 'views', value: 0},
        {label: '评论数', prop: 'comments', value: 0},
        {label: '收藏数', prop: 'stars', value: 0},
        {label: '发布时间', prop: 'publishTime', type: 'datetime'},
        {
            label: '状态', prop: 'status',
            type: 'select',
            props: {
                label: 'value',
                value: 'key'
            },
            dicUrl: `${ServerInfo.BASE_URL}/common/postStatusEnum`,
        },
        {label: '备注', prop: 'remark',},
        {label: '创建时间', prop: 'createTime', type: 'datetime',},

    ]
}



export const approvalTableOption = {
    stripe: true, //条纹
    addBtn: false,
    viewBtn: true,
    editBtn: false,
    delBtn: false,
    searchIndex: 3,
    searchIcon: true,
    height: '68vh',
    selection: true, //多选
    reserveSelection: true, //翻页多选
    index: true, //加序号
    showSummary: true, //展开底部求和
    menuType: 'icon', // 操作栏改为图标展示
    loadingText: "数据加载中...",
    emptyText: '数据空空如也...',
    column: [
        {label: '主键', prop: 'id', hide: true},
        {label: '作者id', prop: 'authorId', hide: true},
        {label: '标题', prop: 'title',},
        {label: '描述', prop: 'desc',},
        {label: '文章内容', prop: 'content', hide: true},
        {label: '查看数', prop: 'views', value: 0},
        {label: '评论数', prop: 'comments', value: 0},
        {label: '收藏数', prop: 'stars', value: 0},
        {label: '发布时间', prop: 'publishTime', type: 'datetime'},
        {
            label: '状态', prop: 'status',
            type: 'select',
            props: {
                label: 'value',
                value: 'key'
            },
            dicUrl: `${ServerInfo.BASE_URL}/common/postStatusEnum`,
        },
        {label: '备注', prop: 'remark',},
        {label: '创建时间', prop: 'createTime', type: 'datetime',},

    ]
}

export const postFormOption = {
    labelWidth: 120,
    column: [
        {label: '作者id', prop: 'authorId',},
        {label: '标题', prop: 'title',},
        {label: '描述', prop: 'desc',},
        {label: '文章内容', prop: 'content',},
        {label: '查看数', prop: 'views', value: 0},
        {label: '评论数', prop: 'comments', value: 0},
        {label: '收藏数', prop: 'stars', value: 0},
    ]
}
